package com.macro.mall.portal.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.macro.mall.portal.dao.CreditMapper;
import com.macro.mall.portal.domain.Credit;
import com.macro.mall.portal.domain.GuidancePrice;
import com.macro.mall.portal.service.ICreditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * <p>
 * 征信查询表 服务实现类
 * </p>
 */
@Service
public class CreditServiceImpl extends ServiceImpl<CreditMapper, Credit> implements ICreditService {

    @Autowired
    private CreditMapper creditMapper;

    @Override
    public List<Credit> selectList(String sear) {

        if (StringUtils.isEmpty(sear))
            sear = "罗湖";
        QueryWrapper<Credit> wrapper = new QueryWrapper<>();

        wrapper.like("area", sear);

        List<Credit> credits = creditMapper.selectList(wrapper);

        return credits;
    }
}
